/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package tv.ventas.rn;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ejb.EJB;
import javax.ejb.Stateless;
import tv.venta.dao.ClienteDAO;
import tv.venta.modelo.Cliente;

/**
 *
 * @author Claudio
 */
@Stateless
public class ClienteRN {

    @EJB private ClienteDAO clienteDAO;

    public Cliente getCliente(Map<String,String> filtro){


        return clienteDAO.getCliente(filtro);

    }

    public List<Cliente> getClientes(Map<String,String> filtro){

        return clienteDAO.getClientes(filtro);
    }

    public Cliente getCliente(String codCliente) {

        Map<String,String> filtro = new HashMap<String,String>();
        filtro.put("nrocta =" , "'"+codCliente+"'");
        return clienteDAO.getCliente(filtro);
    }

    // Add business logic below. (Right-click in editor and choose
    // "Insert Code > Add Business Method")
 
}
